package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 平台订单 物流追踪号
 * </p>
 * @author hua
 * @since 2025-03-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_platform_order_track")
public class PlatformOrderTrackDo extends Model<PlatformOrderTrackDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 平台订单号id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 快递公司id
     */
    @TableField("channel_id")
    private Long channelId;

    @TableField("carrier")
    private String carrier;

    /**
     * 快递单号
     */
    @TableField("track_number")
    private String trackNumber;

    /**
     * wms订单id
     */
    @TableField("outbound_id")
    private Long outboundId;

    @TableField("package_id")
    private Long packageId;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("merge_order_id")
    private String mergeOrderId;


    public PlatformOrderTrackDo(String mergeOrderId, Long orderId, Long outboundId, Long packageId, Long channelId, String carrier, String trackNumber, Long userId) {
        this.mergeOrderId = mergeOrderId;
        this.orderId = orderId;
        this.outboundId = outboundId;
        this.packageId = packageId;
        this.channelId = channelId;
        this.carrier = carrier;
        this.trackNumber = trackNumber;
        this.createBy = userId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
